require 'testcase'
require 'web'
require 'model'

class TestPersister<Test::Unit::TestCase
    include Web
    include Model
    include MDTestCase
  
    def setup
      @w=WebRetriever.new
    end
    
    def test_get_resp
      resp=@w.get_resp("http://dm.game.mop.com/fengmian/54.html")
      puts resp
    end
    
    def test_get_thumbs
        all=@w.get_thumbs("http://dm.game.mop.com/classSearch/s/1.html")
        puts all
      end
      
   def test_down_file
       @w.down_file("http://image.mop.com/acggame/upload/cover/140/1189755331250.jpg","1189755331250.jpg")
     end     
     
    def test_add_thumb_info
       t=Thumb.new
       t.book_index_url="http://dm.game.mop.com/fengmian/573.html"
       @w.add_thumb_info(t)
       puts t.author
    end
end